package ooday04.homework;

//Animal类：name、age、color、Animal(参)、drink()、eat()
public class Animal {
    String name;
    int age;
    String color;
    Animal(){

    }
    Animal(String name, String color, int age) {
        this.name = name;
        this.age = age;
        this.color = color;
    }

    void drink() {
        System.out.println("我叫"+name+"今年"+age+"岁了"+"我是"+color+"色的,正在喝水...");
    }
    void eat(){
        System.out.println("我叫"+name+"今年"+age+"岁了"+"我是"+color+"色的,正在吃饭");
    }
}

